import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class One {
    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String s=br.readLine();
        int n=s.length();
        for (int i = 0; i < n; i++) {
            System.out.print(s.charAt(i));
            if ((n-i-1)%3==0&&i!=n-1){
                System.out.print(',');
            }
        }
    }
}
